Skip to content

Leave no blank line at the end of a file after a move - #32

Merged
nnutter merged 1 commit into
masterfrom
fix-move-starship-semi
Nov 5, 2026
Merged

nnutter merged 1 commit into
masterfrom
fix-move-starship-semi

Conversation

@nnutter

@nnutter nnutter commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

No description provided.

A removal already takes the blank lines that follow the declaration it
removes, but the declaration that ends a file keeps the blank line
above it, so the file ends with a blank line that gofmt rewrites.

Take that blank line too, but only when a removal reaches the end of
the file, so a removal in the middle of a file keeps the blank line
that separates its neighbours.

Change-Id: Ia4bfa9da48bbb7d3b959f56d9e7406be91c46d60
@nnutter
nnutter added this pull request to stack #34 November 5, 2026 07:36
@nnutter
nnutter merged commit 9408314 into master Nov 5, 2026
3 checks passed
@nnutter
nnutter deleted the fix-move-starship-semi branch November 5, 2026 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant